package com.itic.appbase.framework.type;

public enum ConsumeMoneyType {
    yh("yh","精选友惠购物消费"),jd("jd","京东购物消费"),tb("tb","淘宝购物消费"),tm("tm","天猫购物消费"),gm("gm","友惠家【新人红包】免费使用");

    private String type;
	private String name;
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	ConsumeMoneyType(String type, String name) {
		this.type = type;
		this.name = name;
	}
	 
	public static ConsumeMoneyType getConsumeMoneyType(String type) {
		ConsumeMoneyType consumeMoneyType = null;
		switch (type) {
		case "yh":
			consumeMoneyType = ConsumeMoneyType.yh;
			break;
		case "jd":
			consumeMoneyType = ConsumeMoneyType.jd;
			break;
		case "tm":
			consumeMoneyType = ConsumeMoneyType.tm;
			break;
		case "tb":
			consumeMoneyType = ConsumeMoneyType.tb;
			break;
		case "gm":
			consumeMoneyType = ConsumeMoneyType.gm;
			break;
		}
		return consumeMoneyType;
	}

}
